<template>
  <form>
    <label>账号</label>
    <input type="text" v-model="name" />
    <input type="password" v-model="password" />
  </form>
</template>

<script>
export default {
  data() {
    return {
      name: "re",
      password: "we",
    };
  },
  methods: {
    getData() {
      console.log("获取数据", this.name, this.password);
      return {
        name: this.name,
        password: this.password,
      };
    },
    reverseData() {
      this.name = "";
      this.password = "";
    },
  },
};
</script>

<style>
</style>